/*
 * paymentBO.java
 *
 * Created on March 17, 2007, 2:14 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package edu.byu.isys413.mystuff;

/**
 *
 * @author Sam Griffiths
 */
public class storeBO {
    
    //initialize variables        
    private String storeid;
    private String managerid;
    private String address;
    private String phone;
    private boolean dirty = false;   
    private boolean alreadyInDatabase = false;
    
    /** Creates a new instance of customerBO */
    public storeBO() {
    }
        
    //creates a new instance of storeBO
    public storeBO(String storeid) {
    this.storeid = storeid;
    }
    
    //returns storeid
    public String getStoreId() {
        return storeid;
    }

    //returns the id of the manager of the said store
    public String getManagerId() {
        return managerid;
    }

    //sets the manager id of the store bo
    public void setManagerId(String managerid) {
        this.managerid = managerid;
        setDirty(true);
    }

    //returns store address
    public String getAddress() {
        return address;
    }

    //sets store address
    public void setAddress(String address) {
        this.address = address;
        setDirty(true);
    }

    //return phone # of store
    public String getPhone() {
        return phone;
    }

    //set phone of store
    public void setPhone(String phone) {
        this.phone = phone;
        setDirty(true);
    }
    
    //returns store as a string
    public String toString(){
        return "Store id  : "+ this.getStoreId()+" \n"+
               "Manager id: "+ this.getManagerId()+" \n"+
                "Address  : "+ this.getAddress() +" \n"+
                "Phone    : "+ this.getPhone() +" \n";
    }

    //returns if object has been changed since read or saved
    public boolean isDirty() {
        return dirty;
    }

    //sets dirty
    public void setDirty(boolean dirty) {
        this.dirty = dirty;
    }

    //returns if object is already in database
    public boolean isAlreadyInDatabase() {
        return alreadyInDatabase;
    }

    //sets if object is already in database
    public void setAlreadyInDatabase(boolean alreadyInDatabase) {
        this.alreadyInDatabase = alreadyInDatabase;
    }
}